import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  editBtn: false,
  addBtn: false,
  delBtn: false,
  selection: true,
  searchShow: false,
  tip: false,
  menu: false,
  expand: true,
  rowKey: 'caseid',
  expandRowKeys: [],
  column: [
    {
      type: 'input',
      label: '主键ID',
      prop: 'id',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '唯一编码（用于关联附件）',
      prop: 'unid',
      span: 12,
      hide: true
    },
    {
      type: 'select',
      label: '办理状态', // ：默认为0{0：草稿、3：已完成
      prop: 'status',
      span: 12,
      dicUrl: `${services.adminService}dict/type/warehous_status`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      search: true
    },
    {
      type: 'select',
      label: '单据类型', // ：默认为ALL{ DEVICE:资产类；CONSUMABLES：易耗品；All:混合}
      prop: 'type',
      span: 12,
      dicUrl: `${services.adminService}dict/type/type_document`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      search: true
    },
    {
      type: 'input',
      label: '入库单号',
      prop: 'caseid',
      span: 12,
      width: 175,
      search: true
    },
    {
      type: 'input',
      label: '验收单号',
      prop: 'parentCaseid',
      span: 12,
      search: true,
      width: 165
    },
    {
      type: 'datetime',
      label: '入库时间',
      prop: 'inTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'tree',
      label: '供应商',
      prop: 'supplierId',
      span: 12,
      props: { label: 'name', value: 'id' },
      dicUrl: `${services.assetService}fyassetsupplier/tree/V`,
      dicMethod: 'get',
      searchLabelWidth: 90,
      search: true,
      hide: true
    },
    {
      type: 'input',
      label: '供应商',
      prop: 'supplierName',
      span: 12
    },
    {
      type: 'input',
      label: '经办人',
      prop: 'createBy',
      span: 12,
      search: true
    },
    {
      type: 'datetime',
      label: '经办日期',
      prop: 'createTime',
      span: 12,
      width: 135,
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      search: true,
      searchSpan: 12,
      searchRange: true
    },

    {
      type: 'input',
      label: '经办单位',
      prop: 'deptFullname',
      span: 12
    },
    {
      type: 'tree',
      label: '合同或发票',
      prop: 'contractId',
      props: { label: 'name', value: 'id' },
      dicUrl: `${services.assetService}fyassetcontract/contractTree`,
      dicMethod: 'get',
      searchLabelWidth: 90,
      search: true,
      width: 120,
      span: 12
    },
    {
      type: 'input',
      label: '合同或发票名称',
      prop: 'contractName',
      width: 120,
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放房间',
      prop: 'houseName',
      span: 12
    },
    {
      type: 'input',
      label: '存放位置',
      prop: 'locationName',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '采购方式', // 01：邀标、02：自采:03：政府采购
      prop: 'method',
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/asset_purchase_method`,
      dicMethod: 'get',
      span: 12
    },
    {
      type: 'input',
      label: '入库总价格',
      prop: 'amount',
      span: 12
    },
    {
      type: 'input',
      label: '货币类型', // 默认人民币：人民币：、欧元：欧元、美元：美元、法元：法元
      prop: 'currencyType',
      span: 12,
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/currency_type`,
      dicMethod: 'get'
    },
    {
      type: 'input',
      label: '入库说明',
      prop: 'explains',
      span: 12
    },
    {
      type: 'input',
      label: '入库明细',
      prop: 'detailedEx',
      search: true,
      span: 12,
      width: 160
    },
    {
      type: 'input',
      label: '入库人所属OU的ID',
      prop: 'deptId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改人信息',
      prop: 'updateBy',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '最后修改时间',
      prop: 'updateTime',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '入库人ID',
      prop: 'createId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '验收订单ID',
      prop: 'parentId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '单据性质用来区分是冲销还是入库（0入库单，1冲销单）',
      prop: 'classify',
      value: '0',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '批次号',
      prop: 'batchnumber',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '合同或发票编号',
      prop: 'contractNumber',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放房间ID',
      prop: 'houseId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放位置id',
      prop: 'locationId',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '存放地点全名称',
      prop: 'fullLocation',
      span: 12,
      hide: true
    },
    {
      type: 'input',
      label: '资产名称',
      span: 24,
      display: true,
      prop: 'cardName',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '资产编码',
      span: 24,
      display: true,
      prop: 'cardCode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '商品条码',
      span: 24,
      display: true,
      prop: 'barcode',
      hide: true,
      search: true
    },
    {
      type: 'input',
      label: '规格型号',
      span: 24,
      display: true,
      prop: 'model',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '入库数量',
      span: 24,
      display: true,
      prop: 'quantity',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '入库单价',
      span: 24,
      display: true,
      prop: 'price',
      hide: true,
      search: true
    },
    {
      type: 'number',
      label: '入库金额',
      span: 24,
      display: true,
      prop: 'amountList',
      hide: true,
      search: true
    }
    // searchRange: true
  ]
}
